#include "mainwindow.h"
#include <QApplication>

#include <QTextStream>
#include <stdio.h>
#include <QDebug>
#include <QList>
#include <QFile>


#include "serial_opt.h"
#include "result.h"

result *relt;


int init()
{
    QList<QSerialPortInfo> infolist;
    QList<QSerialPortInfo>::iterator iter;
    QSerialPortInfo     info;

    infolist = info.availablePorts();

    for(iter=infolist.begin(); iter != infolist.end(); iter++){
       qDebug()<<iter->description()<<" "<<iter->portName()<<" isbusy:"<<iter->isBusy()<<" isvaild:"<<iter->isValid()<<" isnull:"<<iter->isNull();
    }
    return 0;
}

int main(int argc, char *argv[])
{

    QApplication a(argc, argv);
    relt = new result();
    MainWindow w;
    w.show();



    return a.exec();
}
